//
//  QRAlert.h
//  testAlert
//
//  Created by Hshd on 15/6/29.
//  Copyright © 2015年 Hshd. All rights reserved.
//

#import <UIKit/UIKit.h>


@protocol SDAlertDelegate <NSObject>

@optional
- (void)alertDelegateDismiss;
- (void)alertDelegateButtonClick:(UIButton *)btn andButtonIndex:(int)buttonIndex;

@end

@interface SDAlert : UIView


@property (nonatomic , weak) id<SDAlertDelegate> myDelegate;

/**
 *  自定义alertView
 *
 *  @param alertView 传入的alertView
 *  @param frame     alertView的frame
 *  @param isCancel  点击空白是否可以取消显示
 */
- (instancetype)initWithAlertView:(UIView *)alertView frame:(CGRect)frame isCancel:(BOOL)cancel;

/**
 *  自定义类似系统的alert
 *
 *  @param title     标题
 *  @param descTitle 详情标题
 *
 */
- (instancetype)initWithTitle:(NSString *)title descTitle:(NSString *)descTitle;


/**
 *  显示
 */
- (void)show;

/**
 *  隐藏
 */
- (void)dismiss;


@end
